package com.jacky.javafx;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.util.Objects;

public class AppGraph extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/fxml/graph.fxml"));
        Scene scene = new Scene(fxmlLoader.load());

        String css = Objects.requireNonNull(getClass().getResource("/fxml/graph.css")).toExternalForm();
        scene.getStylesheets().add(css);

        primaryStage.setTitle("Graph Visualizer");
        primaryStage.setMaximized(true);
        primaryStage.setScene(scene);
        primaryStage.show();
    }
}